package com.order.controller.seller;

import com.github.pagehelper.PageInfo;
import com.order.pojo.OrderMaster;
import com.order.pojo.ProductCategory;
import com.order.service.IOrderMasterService;
import com.order.utils.Result;
import com.order.vo.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author llr
 * @since 2025-08-13
 */
@Api(tags = "订单展示")
@RestController
@Slf4j//输出语句
@ApiResponses({
        @ApiResponse(code = 200, message = "新增成功", response = ProductCategory.class),
        @ApiResponse(code = 400, message = "参数错误"),
        @ApiResponse(code = 403, message = "权限被禁止"),
        @ApiResponse(code = 500, message = "服务器内部错误")
})
@RequestMapping("/seller/order-master")
public class OrderMasterController {
    @Autowired
    IOrderMasterService iOrderMasterService;
    @GetMapping("selectPage")
    public Result selectPage(OrderMaster orderMaster,
                             @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
                             @RequestParam(value = "pageSize", defaultValue = "5") int pageSize) {
        PageInfo<OrderMaster> pageInfo=iOrderMasterService.selectpage(pageNum,pageSize,orderMaster);
        return Result.success(pageInfo);
    }
}
